import { defineConfig } from "eslint/config";
import globals from "globals";
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginVue from "eslint-plugin-vue";

export default defineConfig([
  { ignores: ['**/node_modules', '**/dist'] },
  tseslint.configs.recommended,
  eslintPluginVue.configs["flat/recommended"],
  {
    files: ["**/*.vue"],
    languageOptions: {
      parserOptions: {
        parser: tseslint.parser
      }
    }
  },
  {
    files: ["**/*.{js,mjs,cjs,ts,vue}"],
    plugins: {
      js
    },
    extends: ["js/recommended"]
  },
  {
    files: ["**/*.{js,mjs,cjs,ts,vue}"],
    languageOptions: {
      globals: globals.browser
    }
  },
  {
    files: ["**/*.{js,mjs,cjs,ts,vue}"],
    rules: {
      "no-console": "off",
      "vue/multi-word-component-names": "off"
    }
  },
  eslintConfigPrettier
]);
